Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(zone): add Zone resource for Secure #609

Merged
merged 17 commits into from
Mar 20, 2025
Merged

feat(zone): add Zone resource for Secure #609

merged 17 commits into from
Mar 20, 2025

Conversation

vojindj
Copy link
Collaborator

@vojindj vojindj commented Mar 11, 2025

No description provided.

@vojindj vojindj marked this pull request as ready for review March 12, 2025 15:45
Copy link

@luzeno luzeno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but it would be better to get some more experienced review

Computed: true,
},
SchemaScopesKey: {
Optional: true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't know terraform well.
Is this resource related to the new platform zones?
Because if it is, scopes are mandatory, and they can be 1 or more.
On L:52 I see MaxItems:1 .
Also scopes ids are missing 🤔
This is an example response from staging:

// ....
"scopes": [
    {
        "id": 439653,
        "rules": "",
        "targetType": "azure"
    },
    {
        "id": 439654,
        "rules": "",
        "targetType": "kubernetes"
    },
    {
        "id": 439655,
        "rules": "",
        "targetType": "host"
    }
]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for checking! yes, this resource is for creating new platform zones, but since it's only for secure currently it is named like other secure resources.
I changed scopes to be required field and also I added id as a field for scope... nice catch! 👍
MaxItems:1 is for "scopes" field - we can have only one of those. MinItems: 1 is set for "scope", because we need at least one of them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed scopes to simplify the schema

@vojindj vojindj merged commit 631a98d into master Mar 20, 2025
23 checks passed
@vojindj vojindj deleted the SP-4514 branch March 20, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants